﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.EntityModel;
using System.Diagnostics.Contracts;

namespace YasharEl.Infrastructure.OrgUnit
{
    public class Occupation : ValueObject<Occupation>
    {
        #region Fields

        private readonly long _code;
        private readonly string _description;

        #endregion

        #region Constructors

        private Occupation()
        {

        }

        public Occupation(long code, string description)
        {
            Contract.Requires<ArgumentNullException>(code > 0, "code must be valid positive number.");
            Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(description), "description could not be null or empty.");

            _code = code;
            _description = description;
        }

        #endregion

        #region Properties

        public long Code
        {
            get { return _code; }
        }

        public string Description
        {
            get { return _description; }
        }

        #endregion
    }
}
